<%-- 
    Document   : form
    Created on : Jun 18, 2011, 3:30:51 PM
    Author     : Deny Prasetyo
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
        <script type="text/javascript">
            function displayDate(){
                document.getElementById("tanggal").innerHTML=Date();                
            }            
        </script>
    </head>
    <body>
        <c:url value="/pasien?action=insert" var="insert"/>
        
            <form method="post" action="${insert}">
                <table align="center">
                    <tr>
                        <td align="center" style="font-size: 20" colspan="3">FORMULIR PENDAFTARAN DONOR DARAH PMI</td>
                    </tr>
                    <tr>
                        <td>Tanggal</td>
                        <td>:</td>
                        <td><input type="text" name="tanggal" size="30" value=""></td> <td><button type="button" onclick="displayDate()">Display Date</button></td>
                        <%--mas iki yang tanggal carane ben yen klik displaydate, date nya langsung terisi di input text nya gimana? 
                        atau mungkin ada solusi lain yang bagus buat tampilin tanggal--%>                        
                    </tr>
                    <tr>
                        <td colspan="3"><p id="tanggal"></p></td>
                    </tr>
                    <tr>
                        <td>ID</td>
                        <td>:</td>
                        <td><input type="text" name="id" size="30"></td>
                    </tr>
                    <tr>
                        <td>Nama</td>
                        <td>:</td>
                        <td><input type="text" name="nama" size="30"></td>
                    </tr>
                    <tr>
                        <td>Alamat</td>
                        <td>:</td>
                        <td><input type="text" name="alamat" size="30"></textarea></td>
                    </tr>
                    <tr>
                        <td>No Telp</td>
                        <td>:</td>
                        <td><input type="text" name="telp" size="30"></td>
                    </tr>
                    <tr>
                        <td>Umur</td>
                        <td>:</td>
                        <td><input type="text" name="umur" size="30"></td>
                    </tr>
                    <tr>
                        <td>Golongan Darah</td>
                        <td>:</td>
                        <td><select name="gol">
                                <option value="O">O
                                <option value="A">A
                                <option value="B">B
                                <option value="AB">AB
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <td>Jenis Kelamin</td>
                        <td>:</td>
                        <td><input type="radio" name="kelamin" value="pria" size="10">Pria<input type="radio" name="kelamin" value="wanita" size="10">Wanita</td>
                    </tr>
                    <tr>
                        <td>Berat Badan</td>
                        <td>:</td>
                        <td><input type="text" name="berat" size="30"></td>
                    </tr>
                    <tr>
                        <td>Tinggi Badan</td>
                        <td>:</td>
                        <td><input type="text" name="tinggi" size="30"></td>
                    </tr>
                    <tr>
                        <td>Keterangan</td>
                        <td>:</td>
                        <td><input type="text" name="keterangan" size="30"></textarea></td>
                    </tr>
                    <tr>
                        <td><input type="submit" value="simpan"></td><td><input type="reset" name="reset"></td>
                    </tr>
                </table>
            </form>
    </body>
</html>